@extends('Layout/base')
@section('title','商品详情页')

@section('css')
    
    <style media="screen">
        body{
        	background: #ccc;
        }
    </style>
@endsection

@section('main')

    <h2>商品详情</h2>
      <form action="{{url('/detail')}}" method="get">
    <div class="col-md-4">
          <input placeholder="商品名" class="form-control" type="text" name="keyword" />
          
    </div>

    <button class="btn btn-danger" type="submit">搜索</button>
  </form>

    <table class="table table-hover">
        <tr class="table table-hover">
            <th>序号</th>
            <th>商品名</th>
            <th>价格</th>
        </tr>
        @foreach($good as $v)
         <tr>
             <td>{{$v->id}}</td>
             <td>{{$v->gname}}</td>
             <td>{{$v->price}}</td>
         </tr>
        @endforeach
    </table>
    {{$good->appends(['keyword' => $keyword])->links()}}
@endsection

@section('footer-js')
    

<!--     <script type="text/javascript">
        alert('js');
    </script> -->
@endsection

